Optimal. Leaf size=90 \[ -\frac {a^2 A}{2 x^2}+x \left (2 a B c+2 A b c+b^2 B\right )+\log (x) \left (A \left (2 a c+b^2\right )+2 a b B\right )-\frac {a (a B+2 A b)}{x}+\frac {1}{2} c x^2 (A c+2 b B)+\frac {1}{3} B c^2 x^3 \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {765} \[ -\frac {a^2 A}{2 x^2}+x \left (2 a B c+2 A b c+b^2 B\right )+\log (x) \left (A \left (2 a c+b^2\right )+2 a b B\right )-\frac {a (a B+2 A b)}{x}+\frac {1}{2} c x^2 (A c+2 b B)+\frac {1}{3} B c^2 x^3 \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 765
Rubi steps
\begin {align*} \int \frac {(A+B x) \left (a+b x+c x^2\right )^2}{x^3} \, dx &=\int \left (b^2 B \left (1+\frac {2 (A b+a B) c}{b^2 B}\right )+\frac {a^2 A}{x^3}+\frac {a (2 A b+a B)}{x^2}+\frac {2 a b B+A \left (b^2+2 a c\right )}{x}+c (2 b B+A c) x+B c^2 x^2\right ) \, dx\\ &=-\frac {a^2 A}{2 x^2}-\frac {a (2 A b+a B)}{x}+\left (b^2 B+2 A b c+2 a B c\right ) x+\frac {1}{2} c (2 b B+A c) x^2+\frac {1}{3} B c^2 x^3+\left (2 a b B+A \left (b^2+2 a c\right )\right ) \log (x)\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 86, normalized size = 0.96 \[ -\frac {a^2 (A+2 B x)}{2 x^2}+A \log (x) \left (2 a c+b^2\right )+a \left (2 B c x-\frac {2 A b}{x}\right )+2 a b B \log (x)+b c x (2 A+B x)+\frac {1}{6} c^2 x^2 (3 A+2 B x)+b^2 B x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.04, size = 95, normalized size = 1.06 \[ \frac {2 \, B c^{2} x^{5} + 3 \, {\left (2 \, B b c + A c^{2}\right )} x^{4} + 6 \, {\left (B b^{2} + 2 \, {\left (B a + A b\right )} c\right )} x^{3} + 6 \, {\left (2 \, B a b + A b^{2} + 2 \, A a c\right )} x^{2} \log \relax (x) - 3 \, A a^{2} - 6 \, {\left (B a^{2} + 2 \, A a b\right )} x}{6 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 89, normalized size = 0.99 \[ \frac {1}{3} \, B c^{2} x^{3} + B b c x^{2} + \frac {1}{2} \, A c^{2} x^{2} + B b^{2} x + 2 \, B a c x + 2 \, A b c x + {\left (2 \, B a b + A b^{2} + 2 \, A a c\right )} \log \left ({\left | x \right |}\right ) - \frac {A a^{2} + 2 \, {\left (B a^{2} + 2 \, A a b\right )} x}{2 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 92, normalized size = 1.02 \[ \frac {B \,c^{2} x^{3}}{3}+\frac {A \,c^{2} x^{2}}{2}+B b c \,x^{2}+2 A a c \ln \relax (x )+A \,b^{2} \ln \relax (x )+2 A b c x +2 B a b \ln \relax (x )+2 B a c x +B \,b^{2} x -\frac {2 A a b}{x}-\frac {B \,a^{2}}{x}-\frac {A \,a^{2}}{2 x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.53, size = 88, normalized size = 0.98 \[ \frac {1}{3} \, B c^{2} x^{3} + \frac {1}{2} \, {\left (2 \, B b c + A c^{2}\right )} x^{2} + {\left (B b^{2} + 2 \, {\left (B a + A b\right )} c\right )} x + {\left (2 \, B a b + A b^{2} + 2 \, A a c\right )} \log \relax (x) - \frac {A a^{2} + 2 \, {\left (B a^{2} + 2 \, A a b\right )} x}{2 \, x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.15, size = 87, normalized size = 0.97 \[ x^2\,\left (\frac {A\,c^2}{2}+B\,b\,c\right )+x\,\left (B\,b^2+2\,A\,c\,b+2\,B\,a\,c\right )+\ln \relax (x)\,\left (A\,b^2+2\,B\,a\,b+2\,A\,a\,c\right )-\frac {\frac {A\,a^2}{2}+x\,\left (B\,a^2+2\,A\,b\,a\right )}{x^2}+\frac {B\,c^2\,x^3}{3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.44, size = 94, normalized size = 1.04 \[ \frac {B c^{2} x^{3}}{3} + x^{2} \left (\frac {A c^{2}}{2} + B b c\right ) + x \left (2 A b c + 2 B a c + B b^{2}\right ) + \left (2 A a c + A b^{2} + 2 B a b\right ) \log {\relax (x )} + \frac {- A a^{2} + x \left (- 4 A a b - 2 B a^{2}\right )}{2 x^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________